<template>
    <div id="myTopNav">
        <h1>
            <slot>我是新建的组件</slot>
        </h1>
    </div>
</template>
<script>
export default {
    name:'TopNav'
}
</script>
<style lang="less" scoped>
    #myTopNav{
        text-align: center;
        padding: 15px 0;
        width: 100%;
        color: white;
        background-color:deepskyblue;
        h1{
            color: deeppink;
        }
    }
</style>